package com.yxpweb.provider.service.impl;

import bean.UserAddress;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Component;
import service.UserService;

import java.util.Arrays;
import java.util.List;

@DubboService(retries = 3)
@Component
public class UserServiceImpl implements UserService {

    public List<UserAddress> getUserAddressList(String userId) {
        System.out.println("UserServiceImpl" + userId);
        UserAddress userAddress1 = new UserAddress("1", "yangxp", "baoan");
        UserAddress userAddress2 = new UserAddress("2", "feifei", "henan");
        return Arrays.asList(userAddress1, userAddress2);
    }

    public String getName() {
        return "dubbo tt";
    }


}
